package org.cuadroanotacionapi.controller;

import org.cuadroanotacionapi.beans.Jos_fastball_schedule;
import java.sql.Timestamp;
import java.sql.Time;
import java.io.Serializable;
import java.util.List;
import java.util.ArrayList;
import java.util.*;
import java.util.HashMap;
import java.util.Map;
import org.cuadroanotacionapi.persistencia.Jos_fastball_schedulePersistencia;
import org.cuadroanotacionapi.generales.Mensajeria;


/**
*
*  @author
*/

public class Jos_fastball_scheduleController implements Serializable {
private static final long serialVersionUID = 1L;
public static Exception excepcion;



private List<Jos_fastball_schedule> jos_fastball_schedulelist;

private Jos_fastball_schedule selectedjos_fastball_schedule;



public Jos_fastball_scheduleController(){
}

public Jos_fastball_schedule getSelectedJos_fastball_schedule() {
 return selectedjos_fastball_schedule;
}

 public void setSelectedJos_fastball_schedule(Jos_fastball_schedule selectedjos_fastball_schedule) {
 this.selectedjos_fastball_schedule = selectedjos_fastball_schedule;
}


public List<Jos_fastball_schedule> getJos_fastball_schedulelist() {
return jos_fastball_schedulelist;
}

 public void setJos_fastball_schedulelist(List<Jos_fastball_schedule> jos_fastball_schedulelist) {
this.jos_fastball_schedulelist = jos_fastball_schedulelist;
}
/*
*  getMensaje()
*   devuelve el mensaje encontrado...
*/
public String getMensaje() {
   String lexcepcion = excepcion.toString();
   if (lexcepcion.indexOf(":") != -1) {
       lexcepcion = lexcepcion.substring(lexcepcion.indexOf(":") + 1);
   }
  return lexcepcion;
}


/**
*
* Crear()
*/

public boolean Crear (Jos_fastball_schedule jos_fastball_schedule) {
try{
   if (Validar(jos_fastball_schedule)) {
     if (findByPrimaryKey(jos_fastball_schedule)==null) {
         if (!Jos_fastball_schedulePersistencia.Insertar(jos_fastball_schedule)) {
                 excepcion = Jos_fastball_schedulePersistencia.excepcion;
          }
          else{
             return true;
           }
       }else{
             excepcion =new Exception("Ya existe un registro con esos datos");
            return false;
       }
    }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Crear()");
  }
  return false;
}


/**
*
* Editar()
*/

public boolean Editar (Jos_fastball_schedule jos_fastball_schedule) {
try{
   if (Validar(jos_fastball_schedule)) {
 if (Jos_fastball_schedulePersistencia.ExisteRegistro(jos_fastball_schedule)) {
     if (!Jos_fastball_schedulePersistencia.Editar(jos_fastball_schedule)) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
     }
     else{
            return true;
     }
   }else{
             excepcion =new Exception("No existe un registro con esa clave primaria");
            return false;
     }
  }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Editar()");
  }
  return false;
}


/**
*
* Editar(String sqlupdate)
*/

public boolean Editar(String sqlupdate) {
try{
     if (!Jos_fastball_schedulePersistencia.Editar(sqlupdate)) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
     }
     else{
            return true;
     }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Editar()");
  }
  return false;
}


/**
*
* EditarClavePrimaria()
*/

public boolean EditarClavePrimaria (Jos_fastball_schedule jos_fastball_schedule_old , Jos_fastball_schedule jos_fastball_schedule) {
try{
   if (Validar(jos_fastball_schedule_old)) {
 if (Jos_fastball_schedulePersistencia.ExisteRegistro(jos_fastball_schedule_old)) {
     if (!Jos_fastball_schedulePersistencia.EditarClavePrimaria(jos_fastball_schedule_old,jos_fastball_schedule)) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
     }
     else{
            return true;
     }
   }else{
             excepcion =new Exception("No existe un registro con esa clave primaria");
            return false;
     }
  }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Editar()");
  }
  return false;
}


/**
*
* Eliminar()
*/

public boolean Eliminar (Jos_fastball_schedule jos_fastball_schedule) {
try{
 if (findByPrimaryKey(jos_fastball_schedule)!=null) {
     if (!Jos_fastball_schedulePersistencia.Eliminar(jos_fastball_schedule)) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
     }else{
            return true;
           }
   }else{
             excepcion =new Exception("No existe un registro con esa clave primaria");
            return false;
     }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Eliminar()");
  }
  return false;
}


/**
*
* Eliminar(String sqldelete)
*/

public boolean Eliminar(String sqldelete) {
try{
     if (!Jos_fastball_schedulePersistencia.Eliminar(sqldelete)) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
     }else{
            return true;
           }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Eliminar()");
  }
  return false;
}


/**
*
* EliminarTodos()
*/

public boolean EliminarTodos() {
try{
     if (!Jos_fastball_schedulePersistencia.EliminarTodos()) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
     }
     else{
            return true;
     }
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"EliminarTodos()");
  }
  return false;
}


/**
*
* ExisteRegistro()
*/



public boolean ExisteRegistro(Jos_fastball_schedule jos_fastball_schedule) {
try{
  return Jos_fastball_schedulePersistencia.ExisteRegistro(jos_fastball_schedule);
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"ExisteRegistro()");
  }
 return false;
}


/**
*
* findPrimaryKey()
*/



public Jos_fastball_schedule findByPrimaryKey(Jos_fastball_schedule jos_fastball_schedule) {
try{
    this.selectedjos_fastball_schedule = Jos_fastball_schedulePersistencia.findByPrimaryKey(jos_fastball_schedule);
    return selectedjos_fastball_schedule;
  }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPrimaryKey()");
  }
 return null;
}


/**
*
* findById()
*/

public boolean findById(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findById(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findById()");
  }
  return false;
  }


/**
*
* findBySeason()
*/

public boolean findBySeason(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findBySeason(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findBySeason()");
  }
  return false;
  }


/**
*
* findByLeagueid()
*/

public boolean findByLeagueid(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByLeagueid(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByLeagueid()");
  }
  return false;
  }


/**
*
* findByDivisionid()
*/

public boolean findByDivisionid(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByDivisionid(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByDivisionid()");
  }
  return false;
  }


/**
*
* findByVisitingteam()
*/

public boolean findByVisitingteam(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByVisitingteam(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByVisitingteam()");
  }
  return false;
  }


/**
*
* findByHometeam()
*/

public boolean findByHometeam(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByHometeam(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHometeam()");
  }
  return false;
  }


/**
*
* findByGamedatetime()
*/

public boolean findByGamedatetime(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByGamedatetime(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByGamedatetime()");
  }
  return false;
  }


/**
*
* findByGametimezone()
*/

public boolean findByGametimezone(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByGametimezone(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByGametimezone()");
  }
  return false;
  }


/**
*
* findByGametype()
*/

public boolean findByGametype(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByGametype(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByGametype()");
  }
  return false;
  }


/**
*
* findByLocation()
*/

public boolean findByLocation(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByLocation(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByLocation()");
  }
  return false;
  }


/**
*
* findByField()
*/

public boolean findByField(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByField(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByField()");
  }
  return false;
  }


/**
*
* findByStatus()
*/

public boolean findByStatus(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByStatus(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByStatus()");
  }
  return false;
  }


/**
*
* findByBoxscored()
*/

public boolean findByBoxscored(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByBoxscored(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByBoxscored()");
  }
  return false;
  }


/**
*
* findByExtrainfo()
*/

public boolean findByExtrainfo(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByExtrainfo(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByExtrainfo()");
  }
  return false;
  }


/**
*
* findByInnings()
*/

public boolean findByInnings(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByInnings(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByInnings()");
  }
  return false;
  }


/**
*
* findByLinescore()
*/

public boolean findByLinescore(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByLinescore(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByLinescore()");
  }
  return false;
  }


/**
*
* findByHomeroster()
*/

public boolean findByHomeroster(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByHomeroster(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHomeroster()");
  }
  return false;
  }


/**
*
* findByAwayroster()
*/

public boolean findByAwayroster(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByAwayroster(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByAwayroster()");
  }
  return false;
  }


/**
*
* findByHomestats()
*/

public boolean findByHomestats(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByHomestats(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHomestats()");
  }
  return false;
  }


/**
*
* findByAwaystats()
*/

public boolean findByAwaystats(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByAwaystats(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByAwaystats()");
  }
  return false;
  }


/**
*
* findByRunshome()
*/

public boolean findByRunshome(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByRunshome(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByRunshome()");
  }
  return false;
  }


/**
*
* findByHitshome()
*/

public boolean findByHitshome(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByHitshome(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHitshome()");
  }
  return false;
  }


/**
*
* findByErrorshome()
*/

public boolean findByErrorshome(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByErrorshome(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByErrorshome()");
  }
  return false;
  }


/**
*
* findByRunsaway()
*/

public boolean findByRunsaway(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByRunsaway(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByRunsaway()");
  }
  return false;
  }


/**
*
* findByHitsaway()
*/

public boolean findByHitsaway(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByHitsaway(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByHitsaway()");
  }
  return false;
  }


/**
*
* findByErrorsaway()
*/

public boolean findByErrorsaway(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByErrorsaway(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByErrorsaway()");
  }
  return false;
  }


/**
*
* findByScored()
*/

public boolean findByScored(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByScored(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByScored()");
  }
  return false;
  }


/**
*
* findByGameinfo()
*/

public boolean findByGameinfo(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByGameinfo(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByGameinfo()");
  }
  return false;
  }


/**
*
* findByChecked_out()
*/

public boolean findByChecked_out(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByChecked_out(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByChecked_out()");
  }
  return false;
  }


/**
*
* findByChecked_out_time()
*/

public boolean findByChecked_out_time(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByChecked_out_time(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByChecked_out_time()");
  }
  return false;
  }


/**
*
* findByPublished()
*/

public boolean findByPublished(Jos_fastball_schedule jos_fastball_schedule) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByPublished(jos_fastball_schedule) ;
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByPublished()");
  }
  return false;
  }


/**
*
* findByMapa()
*/

public boolean findByMapa(Map parametros) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.findByMapa(parametros);
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByMapa()");
  }
  return false;
}


/**
*
* Func(String funcion, String campo)
*/

public Double Func(String funcion, String campo) {
  try{
     return Jos_fastball_schedulePersistencia.Func(funcion,campo);
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Func()");
  }
  return 0.0;
}


/**
*
* Double Func(String funcion, String campo, String where)
*/

public Double Func(String funcion, String campo,String where) {
  try{
     return Jos_fastball_schedulePersistencia.Func(funcion,campo,where);
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Func()");
  }
  return 0.0;
}


/**
*
* Contador()
*/

public Integer Contador() {
  try{
     int x =Jos_fastball_schedulePersistencia.Contador();
    return x;
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Contador()");
  }
 return 0;
}


/**
*
* Contador(String sql)
*/

public Integer Contador(String sqlquery) {
  try{
     int x =Jos_fastball_schedulePersistencia.Contador(sqlquery);
    return x;
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Contador()");
  }
 return 0;
}


/**
*
* Query()
*/

public boolean Query(String query) {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.Query(query);
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"Query()");
  }
  return false;
}


/**
*
* Listar()
*/



public boolean Listar() {
  try{
     if(jos_fastball_schedulelist != null){
        jos_fastball_schedulelist.removeAll(jos_fastball_schedulelist);
     }
     Map<String, String> parametros = new HashMap<String, String>();
     jos_fastball_schedulelist = Jos_fastball_schedulePersistencia.getLista(parametros);
     if (jos_fastball_schedulelist== null) {
                excepcion = Jos_fastball_schedulePersistencia.excepcion;
       }
       else{
            return true;
            }
    }catch(Exception ex){
     Mensajeria.MensajeError( ex ,"findByMapa()");
  }
            return false;
}


public boolean Validar(Jos_fastball_schedule jos_fastball_schedule) {
 try{
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("org/cuadroanotacionapi/properties/mensajes");

if (jos_fastball_schedule.getId() == null || jos_fastball_schedule.getId().equals("")){
   excepcion=new Exception(bundle.getString("id")  + "  " + bundle.getString("msg.nonulo"));
  return false;
}
  return true;
 }catch(Exception ex){
   Mensajeria.MensajeError(ex, "Validar()");
  return false;

  }
}


}
